<table style="width:100%;" cellspacing="0" cellpadding="4">
                <tr>
                    <td style="font-size:8pt;" class="border2">
                        <table style="width: 100%;cursor:pointer;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0" onclick="SwitchMenu('browse1','browsetext1')">
                            <tr>
                                <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
                                <td class="block_header">{language text="browse"} / {if $sMode == 'new'}{language text="new_members"}{elseif $sMode == 'updated'}{language text="updated_profiles"}{elseif $sMode == 'featured'}{language text="featured_members"}{elseif $sMode == 'online'}{language text="who_s_online_48"}{else}{language text="all_members"}{/if}</td>
                                <td style="text-align:right;padding-right:4px;"><span class="cur" id="browsetext1">[-]</span></td>
                            </tr>
                        </table>

                        <!-- START FORM -->
                        <form name="frm" method="post" action="{url link='public.browse.index' mode=$sMode}" style="margin:0px;">
                        <div class="submenu" id="browse1">
                            <br/>
                            <div id="formhide1">
                            {assign var='i' value=1}
                            {foreach from=$aFields item=aField name=afields key=iKey}
                            {if $i == 1}
                                <table style="width:100%;margin-left:auto;margin-right:auto;" cellpadding="5" border="0">
                                <tr>
                            {/if}
                            {assign var='i' value=$i+1}
                                    <td style="width:25%;font-size:8pt;" class="color">
                                    {assign var='field_name' value="field`$aField.custom_field_id`"}
                                    <label for="{$field_name}">{language translate=$aField.custom_field_name}:</label>
                                    <div style="padding-top:5px;padding-left:5px;">
                                        {filter data=$aFilter.$field_name id=$field_name translate='true'}
                                    </div>
                                    </td>
                                {assign var=iSpan value=$smarty.foreach.afields.total%4}
                                {math equation="a-b" a=4 b=$iSpan assign=iSpan}
                                {if (($smarty.foreach.afields.total-1) == $iKey) && ($iSpan != 4)}
                                    <td style="width:{$iSpan*25}%;font-size:8pt;" class="color" colspan="{$iSpan}"></td>
                                    {assign var='i' value=5}
                                {/if}
                                {if $i == 5}
                                </tr>
                                </table>
                                <br />
                                {assign var='i' value=1}
                                {/if}
                            {/foreach}
<table style="width:100%;margin-left:auto;margin-right:auto;" class="" cellpadding="5">
<tr>
<td style="width:25%;font-size:8pt;" class="color">

<label for="location">{language text="location"}:</label>
	<div style="padding-top:5px;padding-left:5px;">
	{if getParam('us_states')}
	{filter data=$aFilter.location style="width:120px;" onchange="checkUsMode();" any="core.any" id="fldCountrySel"}
	{else}
	{filter data=$aFilter.location style="width:120px;" any="core.any" id="fldCountrySel"}
	{/if}
	</div>
</td>
{if $bUs}
<td style="width:25%;font-size:8pt;" class="color">
<label for="state">{language text="state"}:</label>
	<div style="padding-top:5px;padding-left:5px;">
	{filter data=$aFilter.state style="width:120px;" any="core.any" id="fldStateSel"}
	</div>
</td>
<td style="width:25%;font-size:8pt;" class="color">
<label for="zip">{language text="zip_code"}:</label>
	<div style="padding-top:5px;padding-left:5px;">
	{filter data=$aFilter.zip style="width:120px;" id="fldZip"}
	</div>
</td>
{/if}
<td style="width:25%;font-size:8pt;" class="color">

<label for="display">{language text="display"}:</label>
	<div style="padding-top:5px;padding-left:5px;">
<select name="display" id="display">
		<option value=""{if !$bDisplay} selected="selected"{/if}>{language text="name_and_pics"}</option>
		<option value="1"{if $bDisplay} selected="selected"{/if}>{language text="pics_and_info"}</option>
 </select>
	</div>

</td>
{if !$bUs}
<td colspan="2" style="width:50%;"></td>
{/if}
</tr>
</table>

<br />

<table style="width:100%;margin-left:auto;margin-right:auto;" cellpadding="5">
<tr>
<td style="font-size:8pt;  width:25%;" class="color">

	<label for="age_from">{language text="age_from"}:</label>
	<div style="padding-top:5px;padding-left:5px;">
		{filter data=$aFilter.age_from style="width:50px;" id="age_from"}
		&nbsp;{language text="to"}&nbsp;
		{filter data=$aFilter.age_to style="width:50px;" id="age_to"}
	</div>

</td></td><td style="font-size:8pt; width:25%;" class="color">

	<label for="age_to">{language text="gender"}:</label>
	<div style="padding-top:5px;padding-left:5px;">
		{filter data=$aFilter.gender style="width:65px;" id="gender" any="core.any"}
	</div>

</td><td style="font-size:8pt; width:50%;" class="color">

	{language text="keyword_search_for"}: 
	<div style="padding-top:5px;padding-left:5px;">	
		{filter data=$aFilter.fields_list translate='true'}&nbsp;{filter data=$aFilter.field_value style="width:120px;" onkeydown="if (event.keyCode == 13) document.getElementById('submitForm').click();"}
	</div>

</td>
</tr>
</table>

<div style="padding:5px;text-align:right;" class="">
    <input id="submitForm" name="act[browse_show]" type="submit" value="   {language text="search_1297"}   " class="mainmenu6" onclick="document.getElementById('formhide1').style.display='none';document.getElementById('formhide2').style.display='';" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" />
    <input name="act[browse_reset]" type="submit" value="    {language text="reset"}    " class="mainmenu6" onclick="document.getElementById('formhide1').style.display='none';document.getElementById('formhide2').style.display='';" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" />
</div>

</div>
</div>
</form>
<!-- END FORM -->


<div style="text-align:center;display:none;" id="formhide2">
<table style="margin-left:auto;margin-right:auto;">
<tr>
<td style="font-size:10pt;" class="color">
<b>{language text="updating_browse_settings"}</b>
</td><td>
<table class="pbar3" cellpadding="0" cellspacing="0">
<tr><td>
<span id="progress1">&nbsp; &nbsp;</span>
<span id="progress2">&nbsp; &nbsp;</span>
<span id="progress3">&nbsp; &nbsp;</span>
<span id="progress4">&nbsp; &nbsp;</span>

<span id="progress5">&nbsp; &nbsp;</span>
<span id="progress6">&nbsp; &nbsp;</span>
<span id="progress7">&nbsp; &nbsp;</span>
<span id="progress8">&nbsp; &nbsp;</span>
<span id="progress9">&nbsp; &nbsp;</span>
<span id="progress10">&nbsp; &nbsp;</span>
<span id="progress11">&nbsp; &nbsp;</span>
</td></tr></table>
</td></tr></table>
<script type="text/javascript">do_prog(11,200);</script>

<br/>
</div>

</td>
</tr>
</table>

<br />

{if $bFiltered && $iCnt}
<div style="text-align:center;font-size:9pt;" class="color">{str_replace text="`your_browse_settings_foun`" iCnt="`$iCnt`" }</div>
{/if}

{include file="$sRootPath/_blocks/pager_nav_button.html"}

<!-- START BROWSE -->
{if count($aItems)}
{if $bDisplay}
<table style="width:100%;" cellpadding="8" cellspacing="0">
{foreach from=$aItems item=aItem key=key name=aitems}
<tr class="{if $key % 2 == 0}border13{/if}">
<td style="vertical-align:middle;" class="{if $key % 2 == 0}border13{/if}">
<table style="width:100%;"><tr><td style="width:30%;text-align:center;">

<a href="{url link='public.user' name=$aItem.user}">
    {Account::Avatar sUser=$aItem.user iSize=75 class="pic1" onmouseover="showInfo5('`$aItem.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
</a>

</td><td style="width:70%;vertical-align:top;font-size:8pt;" class="color">
<b>{language text="username"}</b>: <a href="{url link='public.user' name=$aItem.user}">
{$aItem.user}</a>
 <br />
{if $aItem.location}<div style="padding-top:4px;"><b>{language text="location"}</b>: {$aItem.location|translate:'country'}</div>{/if}
<div style="padding-top:4px;"><b>{language text="gender"}</b>: {$aItem.gender|translate:'gender'}</div>
<div style="padding-top:4px;"><b>{language text="age"}</b>: {$aItem.age} </div>
</td></tr></table>
</td></tr>
{/foreach}
</table>
{else}
<table style="width:100%;" cellpadding="8" cellspacing="0">
<tr>
{foreach from=$aItems item=aItem key=key name=aitems}
<td style="text-align:center;vertical-align:middle;">
<table style="margin-left:auto;margin-right:auto;"><tr><td style="font-size:8pt;text-align:center;" class="color">
<div><b><a href="{url link='public.user' name=$aItem.user}">
{$aItem.user}</a>
</b></div>

<a href="{url link='public.user' name=$aItem.user}">
    {Account::Avatar sUser=$aItem.user iSize=75 class="pic1" onmouseover="showInfo5('`$aItem.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
</a>
{if isStaff()}
<div><a class="link_action" href="{url link='current' makefeature=$aItem.id}">[ {if $aItem.feature}{language text="unmake"}{else}{language text="make"}{/if} {language text="featured"} ]</a></div>
{/if}
</td>
</tr>
</table></td>
{if $key % 3 == 2}
</tr>
<tr>
{/if}
{if $smarty.foreach.aitems.last == true}
<td></td>
{/if}
{/foreach}
</tr>
</table>
{/if}
{else}
{if $sMode == 'updated'}
<div class="message_info">{language text="there_are_no_updated_prof"}</div>
{else}
{if $bFiltered}
<form name="frm" method="post" action="{url link='public.browse.index' mode=$sMode}" style="margin:0px;">
<div class="message_info">
	{language text='Mod_Account.no_members_search_filter'}
	<div style="padding:6px;"><input name="act[browse_reset]" type="submit" value="{language text='Mod_Account.reset_search_filter'}" class="mainmenu6" onclick="document.getElementById('formhide1').style.display='none';document.getElementById('formhide2').style.display='';" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" /></div>
</div>
</form>
{elseif $sMode == 'new'}
<div class="message_info">{language text='Mod_Account.no_new_members'}</div>
{elseif $sMode == 'featured'}
	<div class="message_info">{language text='Mod_Account.no_featured_members'}</div>
{else}
<div class="message_info">{language text="there_are_no_members_yet"}</div>
{/if}
{/if}
{/if}
<!-- START BROWSE -->

{include file="$sRootPath/_blocks/pager_nav_button.html"}
{if getParam('us_states')}<script type="text/javascript">checkUsMode();</script>{/if}